create external table jms_dm.dm_terminal_deliver_punctuality_rate_send_sum_dt
(
end_agent_code   string COMMENT '末端代理区code' ,
end_agent_name  string COMMENT '末端代理区' ,
end_center_code   string COMMENT '末端中心code' ,
end_center_name  string COMMENT '末端中心名字' ,
end_city_id   string COMMENT '城市id' ,
end_city_name  string COMMENT '城市名字' ,
final_deliver_network_code   string COMMENT '派件网点code' ,
final_deliver_network_name   string COMMENT '派件网点名字' ,
end_franchisee_code string comment '末端加盟商code',
end_franchisee_name string comment '末端加盟商',
order_source_code   string COMMENT '订单来源code' ,
order_source_name  string COMMENT '订单来源' ,
is_common   int COMMENT '是否共配' ,
need_deliver_count   int COMMENT '应派件总量' ,
 punctuality_sum  int COMMENT '及时派件总量' ,
one_planned_departure_time   string COMMENT '一班规划接件时间' ,
one_plan_warehouse_end_time   string COMMENT '一班规划出仓时间' ,
one_need_deliver_count   bigint COMMENT '一班应出仓总量' ,
one_punctuality_sum   int COMMENT '一班准点出仓量' ,
one_delay_30_minutes   int COMMENT '一班延误30分钟量' ,
one_delay_60_minutes   int COMMENT '一班延误30分钟量' ,
one_delay_120_minutes   int COMMENT '一班延误120分钟总量' ,
two_planned_departure_time   string COMMENT '一班规划接件时间' ,
two_plan_warehouse_end_time   string COMMENT '一班规划出仓时间' ,
two_need_deliver_count   int COMMENT '一班应出仓总量' ,
two_punctuality_sum   int COMMENT '一班准点出仓量' ,
two_delay_30_minutes   int COMMENT '一班延误30分钟量' ,
two_delay_60_minutes   int COMMENT '一班延误30分钟量' ,
two_delay_120_minutes   int COMMENT '一班延误120分钟总量' ,
is_township   int COMMENT '1乡镇 0 非乡镇',
date_time string comment ' 业务日期',
       three_planned_departure_time string comment '三班规划接件时间',
       three_plan_warehouse_end_time string comment '三班规划出仓时间',
       three_need_deliver_count int comment'三班应出仓总量' ,
       three_punctuality_sum    int comment'三班准点出仓量',
       three_delay_30_minutes   int comment'三班延误30分钟量',
       three_delay_60_minutes   int comment'三班延误60分钟量',
       three_delay_120_minutes   int comment'三班延误120分钟总量'
)
comment '派件及时率发件维度汇总'
PARTITIONED BY ( dt string COMMENT '时间分区')
stored as parquet
LOCATION '/dw/hive/jms_dm.db/external/dm_terminal_deliver_punctuality_rate_send_sum_dt'
TBLPROPERTIES (     'discover.partitions' = 'false',  'parquet.column.index.access' = 'true');
alter table jms_dm.dm_terminal_deliver_punctuality_rate_send_sum_dt add columns (
        final_sign_user_code string comment '派件员code'
       ,final_sign_user_name string comment '派件员'
    )cascade ;
